import { createApp } from 'vue'
import App from './App.vue'
import router from './modules/router'
import pinia from './modules/pinia'
//引入ant-design
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
//刷新时，检查是否需要更新token
import { $setToken } from './utils/request'
let token = sessionStorage.getItem('token')
if(token){
    $setToken(token)
}
const app = createApp(App)
app.use(Antd)
app.use(router)
app.use(pinia)
app.mount('#app')
